<!-- ./skins/tpl/requests/request_in_list.tpl begin -->
<div style="width:100%">
<div style="float:left;width:65%;padding:10px;">
<div>
<h2 style="float:left;">Просмотр всех заявок:</h2>
<p style="float:right"><a href="<?=href('page=requests','rem=read','view=default')?>" class="link_act">СПИСОК</a> <a href="<?=href('page=requests','rem=read','view=table')?>" class="link_dis">ТАБЛИЦА</a></p>
<div style="clear:both;"></div>
</div>
<?if(!empty($dom_requests)):?>
	<?foreach($dom_requests as $dr_key => $dr):?>
		<h2><?=$dr['caption']?></h2>
		<?foreach($dr as $d_r_key => $d_r):?>

			<?if(count($d_r) > 2):?>
			<div style="margin-left:20px;">
			<h3><?=($d_r['caption']);?>:</h3>
			
				<?foreach($d_r as $r_key => $r):?>
					<?if(is_array($r)):?>
						<span style="margin:0 5px;"><a href="<?=href('page=requests','rem=request','id='.$r['r_id'])?>"><?=$r['r_title']?> (<?=$r['u_name']?> <?=$r['u_surname']?>)</a></span>
					<?endif?>
				<?endforeach?>
				
			<div class="m_t20">&nbsp;</div>
			</div>
			<?endif?>
			
		<?endforeach?>
		
	<?endforeach?>
<?endif?>
</div>
<div class="request_history">
<h2>События:</h2>
<?if(is_array($r_h)):?>
<?foreach($r_h as $r_h_key => $h):?>
<div>
<p><?=$h['modified_date']?></p>
<p><span class="bold">Заголовок:</span> <?=$h['title']?></p>
<p><span class="bold">Организатор:</span> <?=$h['name']?> <?=$h['surname']?></p>
<p><span class="bold">Комментарий:</span> <?=$h['closed_comment']?></p>
</div>
<div class="m_t20">&nbsp;</div>
<?endforeach?>
<?endif?>
</div>
<div style="clear:both">&nbsp;</div>
</div>

<!-- ./skins/tpl/requests/request_in_list.tpl end -->

